﻿using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Content;

namespace RPGLib
{
    public class Map
    {
        public string Name;             //Name der Karte
        public List<string> TileSets;   //Liste aller zugehörigen TileSets
        public int Width, Height;       //Höhe und Breite der Map
        public MapArray MapField;       //Dreidimensionales Array, enthält Base, Transition, Object

        public Map() { }

        public Map(int width, int height, string name)
        {
            this.Height = height;
            this.Width = width;
            this.Name = name;

            this.TileSets = new List<string>();

            //StandartTileSet Laden
            this.TileSets.Add("C:\\tileSet.dat");

            //nMap.TileSet = new TileSet();
            //nMap.TileSet.Height = 10;
            //nMap.TileSet.Width = 12;
            //nMap.TileSet.TileSize = 48;
            //nMap.TileSet.Path = "content\\Textures\\tileset";

            this.MapField = new MapArray(width, height);

            for (int y = 0; y != width; y++)
            {
                for (int x = 0; x != height; x++)
                {
                    this.MapField.SetTile(x, y, 0, 0);
                    this.MapField.SetTile(x, y, 1, -1);
                    this.MapField.SetTile(x, y, 2, -1);
                    this.MapField.SetTile(x, y, 3, 1);
                }
            }
        }
    }
}
